﻿using System;

namespace BizControl.Library.Helpers
{
  internal static class StringHelper
  {
    internal static string GetShortenDescription(string completeDescription, int maxLenght = 100)
    {
      string shortenDescription = string.Empty;
      if (string.IsNullOrEmpty(completeDescription) || completeDescription.Length < maxLenght) return completeDescription;
      
      shortenDescription = completeDescription.Substring(0, maxLenght);
      return shortenDescription + "...";
    }
  }
}
